package 自己写的;

public class 水仙花数 {
    public static void main(String[] args) {
        System.out.print("水仙花数有");
        for (int i = 100; i < 1000; i++) {

            int ge = i % 10;
            int shi = i / 10 % 10;
            int bai = i / 100;

            if (ge * ge * ge + bai * bai * bai + shi * shi * shi == i) {
                System.out.print(i + "  ");
            }
        }
    }
}
